
// @ts-ignore
import {Descriptions, DescriptionsProps, Modal} from "antd";
import React from "react";

// @ts-ignore
export default function UserDetailModal({open,onClose,user}){
	const items: DescriptionsProps['items'] = [
		{
			key:"username",
			label:"用户名",
			children:user.username
		},{
			key:"nickname",
			label:"昵称",
			children:user.nickname
		},{
			key:"mobile",
			label:"手机号",
			children:user.mobile
		},{
			key:"email",
			label:"邮箱",
			children:user.mobile
		},{
			key:"addTime",
			label:"注册时间",
			children:user.addTime
		},{
			key:"addNickname",
			label:"添加人",
			children:user.addNickname
		}
	]
	return (
		<Modal title={"用户详情"} okText={"确定"} cancelText={"取消"} okButtonProps={{ autoFocus: true }} destroyOnClose={true}
					 open={open} onCancel={onClose} onOk={onClose}>
			<Descriptions bordered items={items} size={"small"} column={{ xs: 1, sm: 1, md: 1, lg: 1, xl: 1, xxl: 1 }}/>
		</Modal>
	);
}